﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace HARTCalibrationTool.SerialPortManager
{
    public class HARTSerialPort_woyatechHARTModem : HARTSerialPort
    {
        public HARTSerialPort_woyatechHARTModem() { }

        public override async Task SerialPortWrite(byte[] cmdCode)
        {
            await Task.Run(() =>
            {
                if (_serialPort.IsOpen)
                {
                    _serialPort.Write(cmdCode, 0, cmdCode.Length);
                }
            });
        }
    }
}
